<?PHP

function parseHtml($html, $variables){
	
	while(strpos($html, "{{")){
		$variable = substr($html, strpos($html, "{{"), (strpos($html, "}}")-strpos($html, "{{"))+2); // returns {variableName}
		$tempVar = substr($variable, 2, -2);
		$html = str_replace($variable, $variables[$tempVar], $html);
	}
	
	return $html;
}

?>